import request from '@/utils/request'
import { download } from '@/utils/request'

// 新增企业性质设置
export function addCompanyNature(data) {
  return request({
    url: '/businessCore/faBasicCompanyNature',
    method: 'post',
    data
  })
}

// 修改企业性质设置
export function updateCompanyNature(data) {
  return request({
    url: '/businessCore/faBasicCompanyNature',
    method: 'put',
    data
  })
}

// 删除企业性质设置
export function delCompanyNature(id) {
  return request({
    url: '/businessCore/faBasicCompanyNature/' + id,
    method: 'delete'
  })
}

// 导出企业性质设置
export function exportCompanyNature(params, fileName) {
  const url = '/businessCore/faBasicCompanyNature/export'
  download(
    url,
    params,
    fileName + `_${new Date().getTime()}.xlsx`
  )
}